1. Field of the Invention
The present invention relates to an audio coding device for coding an audio signal and an audio decoding device for decoding a coded audio signal and, more particularly, to an audio coding device and an audio decoding device which conduct highly efficient audio coding and decoding such as MPEG audio systems or the like.
2. Description of the Related Art
Known as an audio signal coding system for television and the like is MPEG (Moving Picture Expert Group) whose standardization was studied by ISO/IEC,JTC1/SC2/WG8. One of the MPEG (hereinafter referred to as MPEG audio) standards which is provided for in the recommendation ISO/IEC-11172-3 (1993) prescribes a decoder for coded audio signals.
In highly efficient audio coding, such as MPEG audio and the like, efforts have been made to reduce information size in order to prevent the amount of information from increasing. It is conventionally a common method to conduct quantization bit weight processing within a period of a unit frame and allocate a quantization bit number to each frequency band.
An example of a structure of a conventional audio coding device is shown in FIG. 5 for coding an audio signal according to MPEG audio standards. With reference to FIG. 5, the conventional audio coding device includes a filter 101 which divides a band of an input audio signal AI and outputs a band signal BF at each of 5 frequency bands. A bit allocating unit 102 receives the band signal BF and a weight signal. The bit allocating unit 102 uses the subband bit allocation pattern signal, hereinafter referred to as a weight signal W, for allocating a quantization bit number for weighting each band signal BF, which is quantized to generate quantization data CQ. A frame packing unit 110 receives the quantization data CQ and outputs a compression signal CA according to the MPEG standards. A Fast Fourier Transform (hereinafter referred to as FFT) circuit 104 conducts frequency analyses of the input audio signal AI and provides an analysis signal FA to a bit weighting unit 105, which determines a weight corresponding to auditory characteristics, and provides the weight signal W to the bit allocating unit 102.
Operation of the conventional audio coding device is as follows. First, the applied audio signal AI is supplied to the FFT 104 and the filter 101. The FFT 104 conducts frequency analyses of the input audio signal AI and provides the analysis signal FA to the bit weighting unit.105. Utilizing auditory characteristics such as Fletcher-Munson characteristics, the bit weighting unit 105 determines a weight for frequency correction based on the data of the analysis signal FA to output the weight signal W.
The filter 101 divides the input audio signal AI into a plurality of frequency bands, each band having a fixed frequency width, and supplies the band signal BF to the bit allocating unit 102. The bit allocating unit 102 allocates a quantization bit number to the band signal BF of each frequency band and quantizes the band signal BF based on the weight signal W received from the bit weighting unit 105, as well as other information such as transmission rate of a compressed signal, to generate quantization data CQ. The frame packing unit 110 adds incidental information to the quantization data CQ to generate and output the compression data CA.
Here, the bit weight allocation processing conducted by the FFT 104, the bit weighting unit 105, and the bit allocating unit 102, varies considerably in time according to the amount of data of the analysis signal FA. There is a case where the time required for processing is so long that processing is not completed within a prescribed time of a unit frame period. In this case, the value of the bit weight signal W is indeterminate and causes a severe bit allocation error in the compression data CA. This error is the main factor which contributes to generation of quantization noise.
In addition, during coded audio signal decoding when a severe bit error of compression data is detected in a current frame, which error has resulted from unstable bit weighting as described above, an entire previous frame is decoded again. The previous frame is stored in a frame storing circuit immediately before the current frame with the detected bit error. This twice decoded previous frame is now the decoder output in place of the current frame with the error, in order to prevent noise generation resulting from the bit error.
FIG. 6 shows an example of a conventional audio decoding device for decoding an audio signal which is coded according to the MPEG standards. With reference to FIG. 6, the conventional audio decoding device includes a frame unpacking unit 121 for unpacking received compression data CA of each frame (hereinafter, referred to as current frame data) into decodable and operatable block data BD. The frame unpacking unit 21 supplies a decoding operation unit 123 and an error detecting unit 122 with the block data BD. The error detecting unit 122 outputs an error signal E upon detecting an error in the received block data BD. The decoding operation unit 123 decodes the received block data BD and outputs decoded data DA and interim operation data DM. An operation memory 124 stores the interim operation data DM. An output unit 125 converts the data DA into audio data AF. The conventional audio decoding device also includes a frame memory 126 for storing current frame data CA, which is input on a frame basis, and outputs memory data MA which is compressed data of a frame immediately before the current frame data CA (herein after referred to as a previous frame). A switch 127 performs selective switching between the current frame data CA and the previous frame data MA and supplies to the current or previous frame unpacking unit 121. For MPEG audio, typical required memory capacity of the operation memory 124 is approximately 27K bits, while the required memory capacity of the frame memory 126 is approximately 14K bits.
Next, operation of the conventional audio decoding device will be described. In the initial state, the switch 127 selects the current frame data CA. While applied current frame data CA is stored in the frame memory 126, it is supplied to the frame unpacking unit 121 through the switch 127. The frame unpacking unit 121 unpacks the applied current frame data CA into the block data BD according to a prescribed format, and supplies the block data BD to the decoding operation unit 123 and the error detecting unit 122. The decoding operation unit 123 conducts inverse quantization processing and operation processing such as filter operation according to a coding system with respect to the applied block data BD. Then, the decoding operation unit 123 supplies the output unit 125 with the decoded data DA, which is a result of the operation processing. The decoded data DA are sequentially stored in the operation memory 124 as interim operation data DM until operation of one block is completed. In addition, the decoded data DA are output in a lump to the output unit 125. The output unit 125 converts the decoded data DA into an audio signal AF which is modulated using, for example, pulse code modulation (PCM).
The error detecting unit 122 examines block data BD input from the frame detecting unit 21. When detecting an error, such as no synchronizing signal pattern in the block data BD and data format of the block data BD not complying with MPEG standards, the error detecting unit 122 outputs an error signal E to control the switch 127. Upon receiving the error signal E, the switch 127 switches to supply the frame unpacking unit 121 with the previous frame data MA, which is provided from the frame memory 126, instead of the current frame data 24. As a result, the previous frame data MA, which has been recognized as having no error, is divided and decoded in place of the current frame data CA.
As described in the foregoing, in conventional audio coding devices, the quantization bit weight allocation processing time varies considerably depending on the results of the frequency analysis by an FFT. Due to this considerable time variation, processing may not be completed within a prescribed time of a unit frame period in the worst case, rendering the results of weight allocation processing indeterminate. Conventional devices therefore have drawbacks, such that severe quantization bit number allocation error may occur in output compression data to cause serious quantization noise generation.
Further, conventional audio decoding devices require a frame memory capable of storing input compression data of more than one frame, because when an error is detected in input compression data, another decoding of the whole coded data of a previous frame, which is immediately before the current frame with the error, must be conducted.